Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
When exporting components (e.g. React), how to keep track of "which components are importing this component"?

In upstream components like App.js, I can identify the list of child components being imported:

import SorryForDumbQuestion from './SorryForDumbQuestion';

But I'm struggling the other way around. When I look inside SorryForDumbQuestion.js there is an export code saying "I want to export this component" but it doesn't tell me where. Rightfully so, especially for reusable components. But in reality I want to know the consumers, and I don't know the best way to do that.

Best may be subjective as there are many ways of doing this, but is there an established good-practice way? For example I could:

  1. comment them when exporting
export default SorryForDumbExamples;
// to be used by App.js
  1. rely on IDE

  2. create documentation

  3. remember this in my brain

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!